To get an idea of whether the failure is reproducible.
* Build-depend on procps, used to check for leaked processes
* debian/test.sh: factor out our dh_auto_test wrapper, and clean
up any stray processes even if the test fails
+ * If build-time tests fail, try 4 more times to get an idea of
+ whether the failure is reproducible
-- Simon McVittie <smcv@debian.org> Sat, 11 Jun 2016 19:52:40 +0100
export VERBOSE=1
-exit_status=0
-dh_auto_test || exit_status=1
+try_tests=5
+
+failed=0
+make check || failed=1
+
+if [ "$failed" -gt 0 ]; then
+ echo "Test failed! Checking how reproducible it is..."
+ for i in $(seq 1 "$(( $try_tests - 1 ))"); do
+ if ! make check; then
+ failed=$(( $failed + 1 ))
+ fi
+ done
+fi
pkill --full "gpg-agent --homedir /var/tmp/tap-test\\.[^/]+/.*" || :
pgrep lt-ostree | xargs --no-run-if-empty ps ww
fi
-exit $exit_status
+if [ "$failed" -gt 0 ]; then
+ echo "Failed $failed out of $try_tests test runs"
+ exit 1
+fi
+
+exit 0
# vim:set et sw=4 sts=4: